<div class="page-title"><?php
print $this->t ( 'admin-panel page title' )?>:</div>
<div id="table-wrapper">
<table id="admin-panel">
	<thead>
		<tr>
	<?php
	foreach ( $this->metadata as $value ) {
		?>
		<th><?php
		print ucwords ( $value )?></th>
	<?php
	}
	?>
	<th><?php
	print $this->t ( 'admin-panel functions' )?></th>
		
		
		<tr>
	
	</thead>
	<tbody>
		<?php
		foreach ( $this->elements as $element ) {
			?>
		<tr>
			<?php
			print $this->partialControl ( $this->control, $element )?>
			<td><a
				href="<?php
			print $this->url ( array ('action' => 'update', 'id' => $element->id ) )?>"><?php
			print $this->t ( 'admin-panel edit' )?></a> <a
				href="<?php
			print $this->url ( array ('action' => 'delete', 'id' => $element->id ) )?>"><?php
			print $this->t ( 'admin-panel delete' )?></a></td>
		</tr>
		<?php
		}
		?>
	</tbody>
	<tfoot>
		<tr>
			<th colspan="<?php
			print (sizeof ( $this->metadata ) + 1) ?>"
				id="add-button">
		<?php
		if (! is_null ( $this->back_url ))
			print '<a href="' . $this->back_url . '">' . $this->t ( 'admin-panel back' ) . '</a>';
		?>
		<a
				href="<?php
				print $this->url ( array ('action' => 'create', 'id' => $this->parent_id ) )?>"><?php
				print $this->t ( 'admin-panel add' )?></a></th>
		</tr>
	</tfoot>
</table>
</div>
